package com.haynes.meetxiaohai.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.haynes.meetxiaohai.entity.OrderDetail;
import com.haynes.meetxiaohai.mapper.OrderDetailMapper;
import com.haynes.meetxiaohai.service.OrderDetailService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author Haynes
 * @Date 2023/3/26 19:19
 * @PackageName:com.haynes.reggie.service.impl
 * @ClassName: OrderDetailServiceImpl
 */
@Service
public class OrderDetailServiceImpl extends ServiceImpl<OrderDetailMapper,OrderDetail>  implements OrderDetailService{

    @Override
    public List<OrderDetail> getOrderDetailById(Long id) {
        LambdaQueryWrapper<OrderDetail> orderDetailLambdaQueryWrapper = new LambdaQueryWrapper<>();
        orderDetailLambdaQueryWrapper.eq(id!=null,OrderDetail::getOrderId,id);
        return this.list(orderDetailLambdaQueryWrapper);
    }
}
